﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlutoStudio.Domain.UnitOfWork
{
    /// <summary>
    /// 用于 <see cref="IActiveUnitOfWork.Failed"/> 事件的事件参数。
    /// </summary>
    public class UnitOfWorkFailedEventArgs : EventArgs
    {
        /// <summary>
        /// 导致失败的异常。
        /// </summary>
        public Exception Exception { get; private set; }

        /// <summary>
        /// 创建新的 <see cref="UnitOfWorkFailedEventArgs"/> 对象实例。
        /// </summary>
        /// <param name="exception">导致失败的异常。</param>
        public UnitOfWorkFailedEventArgs(Exception exception)
        {
            Exception = exception;
        }
    }
}
